package com.dingup.paike.dao;

import com.dingup.paike.model.subscription.PkSubscriptionMsg;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jun 2018/10/26
 */
public interface PkSubscriptionMsgMapper {
    Boolean add(PkSubscriptionMsg tsSubscriptionMsg);

    /**
     * 获取数据, 用于统计缺勤人数; cmd 默认 67371107, 数据为最近10分钟的
     *
     * @return List<PkSubscriptionMsg>
     */
    List<PkSubscriptionMsg> list4CountAbsentUser();

    /**
     * 通过课程号查找信息
     *
     * @param classId Integer
     * @return List<PkSubscriptionMsg>
     */
    List<PkSubscriptionMsg> listByCourseId(Integer classId);

    /**
     * 通过courseId和用户id获取PkSubscriptionMsg
     *
     * @param courseId Integer
     * @param uId      String
     * @return List<PkSubscriptionMsg>
     */
    List<PkSubscriptionMsg> listByCourseIdAndUId(@Param("courseId") Integer courseId,
                                                 @Param("uId") String uId);

}
